When two electronic components communicate, an initiating device sends a signal to a target device according to a communication protocol. The signal may include commands, data, or other information. If the target device is unable to handle the signal sent by the initiating device, the communication may not be properly handled unless the communication protocol includes some recovery or flow control mechanism.
A flow control mechanism provides a method of adjusting the flow of signals from an initiating device to a target device to ensure that the target device can handle all of the incoming signals. If the initiating device is capable of sending signals to the target device at a rate faster than the ability of the target device to handle or process them, a flow control mechanism may become increasingly useful.
One flow control mechanism that may be used in data communication is an xon/xoff protocol. With this mechanism, the target device receives and processes signals received from the initiating device until the target device is no longer able to handle additional signals. The target device then sends a xoff signal to the initiator to indicate that it is not able to handle additional signals. When the target device is again able to accept additional signals, the target sends an xon signal to the initiator to indicate that communication may resume. This flow control mechanism allows the target device to control the flow of communication from the initiating device.
Another flow control mechanism is a ready/acknowledge scheme. In this scheme, the initiator asserts a ready signal to indicate that it is ready to transfer a request. The target asserts an acknowledge signal when it is ready. The transfer takes place when both ready and acknowledge signals are asserted. This allows communication to be delayed until the target is ready to accept a signal from the initiator.
Another flow control mechanism uses a credit-based scheme in which the target issues credits to the initiator. For example, if the target device issues four credits, then the initiating device is allowed to send four requests whenever such requests are needed. The target device can issue a credit to the initiator by asserting a credit signal. When the initiating device is ready to issue a signal to the target, the initiating device asserts a valid signal to indicate that communication is available.
A credit-based flow control mechanism may allow pipeline registers to be inserted on the credit and valid signals without changing the mechanism because there is no fixed relationship between those signals. The initiating device can assert valid signals as long as it has credits available. Inserting pipeline registers between an initiating device and a target device isolates combinatorial logic behind the registers so as to provide a clean timing interface.